package com.hn.gege.sys.modules.record.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.hn.gege.sys.conf.handle.annotation.EnumsDict;
import com.hn.gege.sys.modules.record.enums.CreatePatternEnum;
import com.hn.gege.sys.modules.record.enums.DisabledStatusEnum;
import com.hn.gege.sys.modules.record.enums.ExportStatusEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 导出记录
 * </p>
 *
 * @author zxy
 * @since 2021-08-30
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("record_export")
@ApiModel(value="Export对象", description="导出记录")
public class Export implements Serializable {

    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "记录ID")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "批次ID")
    private String batchId;

    @ApiModelProperty(value = "来源")
    private String source;

    @ApiModelProperty(value = "类别")
    private String category;

    @ApiModelProperty(value = "队列第几个")
    private Integer queueIndex;

    @ApiModelProperty(value = "结果数")
    private Integer resultCount;

    @ApiModelProperty(value = "文件名")
    private String fileName;

    @ApiModelProperty(value = "文件路径")
    private String filePath;

    @ApiModelProperty(value = "重启是需要参数")
    private String param;

    @ApiModelProperty(value = "生成方式(自动: auto, 手动: manual)")
    private CreatePatternEnum createPattern;

    @EnumsDict
    @ApiModelProperty(value = "状态：有效(enabled)、无效(disabled) , 默认有效")
    private DisabledStatusEnum status;

    @ApiModelProperty(value = "状态：生成中(creating)、已生成(created)、生成失败(failed)")
    private ExportStatusEnum exportResult;

    @ApiModelProperty(value = "预计生成结果时间")
    private Date estimateTime;

    @ApiModelProperty(value = "实际生成结果时间")
    private Date actualTime;

    @ApiModelProperty(value = "创建人员")
    @TableField("createUser")
    private String createUser;

    @ApiModelProperty(value = "创建时间")
    @TableField("createDate")
    private Date createDate;

    @ApiModelProperty(value = "修改人员")
    @TableField("modifyUser")
    private String modifyUser;

    @ApiModelProperty(value = "修改时间")
    @TableField("modifyDate")
    private Date modifyDate;



}
